﻿CREATE PROCEDURE Select_ForeignKeyTable_By_PrimaryKey
	@CompositeKey1 nvarchar(100),
	@CompositeKey2 nvarchar(100),
	@CompositeKey3 nvarchar(100)
AS
SELECT
	[ForeignKeyTable].[CompositeKey1],
	[ForeignKeyTable].[CompositeKey2],
	[ForeignKeyTable].[CompositeKey3],
	[ForeignKeyTable].[PrimaryKeyId],
	[ForeignKeyTable].[TableId],
	[ForeignKeyTable].[GuidField],
	[ForeignKeyTable].[Field1],
	[ForeignKeyTable].[Field2]
FROM [ForeignKeyTable]
WHERE
	[CompositeKey1] = @CompositeKey1 AND
	[CompositeKey2] = @CompositeKey2 AND
	[CompositeKey3] = @CompositeKey3


